home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Think Class Libraries / SAT-TCL 1.0b2 / SAT-TCL ƒ / CSATWindow.p < prev    next >
Text File  |  1996-06-08  |  3KB  |  128 lines

  1. {****************************************************}
  2. {}
  3. {    CSATWindow                                                                                                    }
  4. {}
  5. {    Window class for use with the Sprite Animation Toolkit. The rationale is        }
  6. {    that a single instance of this class contains the SAT Pane.                                }
  7. {}
  8. {    This class takes care of the SATWindMoved calls, informing SAT that the        }
  9. {    window containing its drawing area has moved.                                                }
  10. {}
  11. {****************************************************}
  12.  
  13.  
  14. unit CSATWindow;
  15.  
  16. interface
  17.  
  18.     uses
  19.         TCL, SATTCLIntf;
  20.  
  21. implementation
  22.  
  23.  
  24. {****************************************************}
  25. {}
  26. {    ISATWindow                                                                                                    }
  27. {}
  28. {    Initializes a SAT Window object.                                                                    }
  29. {}
  30. {****************************************************}
  31.  
  32.     procedure CSATWindow.ISATWindow (WINDid: Integer;
  33.                                     aFloating: Boolean;
  34.                                     anEnclosure: CDesktop;
  35.                                     aSupervisor: CDirector);
  36.  
  37.     begin { ISATWindow }
  38.         IWindow(WINDid, aFloating, anEnclosure, aSupervisor);
  39.  
  40.         { As long as this is nil, there is no SAT Pane. }
  41.         itsSATPane := nil;
  42.     end; { ISATWindow }
  43.  
  44.  
  45. {****************************************************}
  46. {}
  47. {    SetSATPane                                                                                                    }
  48. {}
  49. {    For completeness, reset our pointer to the SAT Pane.                                    }
  50. {}
  51. {****************************************************}
  52.  
  53.     procedure CSATWindow.Free;
  54.  
  55.     begin { Free }
  56.         itsSATPane := nil;
  57.  
  58.         inherited Free;
  59.     end; { Free }
  60.  
  61.  
  62. {****************************************************}
  63. {}
  64. {    InstallSATPane                                                                                                }
  65. {}
  66. {    Call this to install the SAT Pane.                                                                    }
  67. {}
  68. {****************************************************}
  69.  
  70.     procedure CSATWindow.InstallSATPane (aSATPane: CSATPane);
  71.  
  72.     begin { InstallSATPane }
  73.         itsSATPane := aSATPane;
  74.     end; { InstallSATPane }
  75.  
  76.  
  77. {****************************************************}
  78. {}
  79. {    Drag                                                                                                                }
  80. {}
  81. {    After dragging, call SAT.                                                                                }
  82. {}
  83. {****************************************************}
  84.  
  85.     procedure CSATWindow.Drag (macEvent: EventRecord);
  86.  
  87.     begin { Drag }
  88.         inherited Drag(macEvent);
  89.  
  90.         SATWindMoved;
  91.     end; { Drag }
  92.  
  93.  
  94. {****************************************************}
  95. {}
  96. {    Move                                                                                                            }
  97. {}
  98. {    After moving, call SAT.                                                                                }
  99. {}
  100. {****************************************************}
  101.  
  102.     procedure CSATWindow.Move (hGlobal, vGlobal: integer);
  103.  
  104.     begin { Move }
  105.         inherited Move(hGlobal, vGlobal);
  106.  
  107.         SATWindMoved;
  108.     end; { Move }
  109.  
  110.  
  111. {****************************************************}
  112. {}
  113. {    MoveOffScreen                                                                                                }
  114. {}
  115. {    After moving offscreen, call SAT.                                                                    }
  116. {}
  117. {****************************************************}
  118.  
  119.     procedure CSATWindow.MoveOffScreen;
  120.  
  121.     begin { Move }
  122.         inherited MoveOffScreen;
  123.  
  124.         SATWindMoved;
  125.     end; { Move }
  126.  
  127.  
  128. end. { CSATWindow }